Skip to content

Fix version in config header when used as subproject#933

Merged
kblaschke merged 1 commit into
projectM-visualizer:masterfrom
LordMZTE:version-fix
Dec 1, 2025
Merged

Fix version in config header when used as subproject#933
kblaschke merged 1 commit into
projectM-visualizer:masterfrom
LordMZTE:version-fix

Conversation

@LordMZTE
Copy link
Copy Markdown
Contributor

@LordMZTE LordMZTE commented Dec 1, 2025

When projectM is included in another CMake project using add_subdirectory, we will incorrectly insert the version number and commit revision of the top-level project in our version.h config header.

This changes the global CMAKE_PROJECT_VERSION* values to their local PROJECT_VERSION* equivalents for the innermost project. It will also set the working directory of the git process for determining the revision so we don't get the revision of the outer project.

Copy link
Copy Markdown
Member

@kblaschke kblaschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, that's definitely an issue that needs fixing.

@kblaschke kblaschke merged commit ddf607a into projectM-visualizer:master Dec 1, 2025
37 checks passed
@LordMZTE LordMZTE deleted the version-fix branch December 1, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants